<template>
  <div>
      <table border="2" cellspacing="1">
        <tr>
          <td>年级</td>
          <td>课程</td>
        </tr>
        <tr v-for="i in courselist">
          <td>{{i.name}}</td>
          <td>
          <table>
            <tr>
              <td v-for="j in i.clist">{{j.name}}</td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
  </div>
</template>


<script>
export default {
  name: "Course",
  data() {
    return {
      courselist:[]

    }
  },
  methods: {
    getlist(){
      this.$axios.get('users/ShowCourse/')
        .then(res=>{
          this.courselist = res.data.list
        })
    }
  },
  mounted() {
    this.getlist()
  }
}
</script>

<style scoped>

</style>
